﻿package  org.flexr.umvc
{
	import flash.events.EventDispatcher;
	
	/**
	 * ...
	 * @author Laurent Zuijdwijk
	 */
	public class CentralDispatcher extends EventDispatcher
	{
		private static var _instance:CentralDispatcher;
		
		public function CentralDispatcher() 
		{
			if (_instance == null) _instance = this;
			else throw Error('Only one instance allowed');
		}
		
		public static function get instance():CentralDispatcher
		{
			if (_instance == null)
			{
					new CentralDispatcher();
			}
			return _instance;
		}
		
	}

}